package com.bnlr.lrparking.appui.sharevalue.recharge;

import android.content.Intent;
import android.os.Bundle;
import android.widget.TextView;

import com.bnlr.lrparking.R;
import com.bnlr.lrparking.base.BaseActivity;
import com.bnlr.lrparking.model.RechargeListM;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;

/**
 * 充值详情
 *
 * @author hp
 * @date 2017/8/31
 */

public class RechargeDetailsActivity extends BaseActivity {

    @BindView(R.id.tv_nav_title)
    TextView tv_nav_title;
    @BindView(R.id.tv_price)
    TextView tv_price;
    @BindView(R.id.tv_time)
    TextView tv_time;
    @BindView(R.id.tv_order)
    TextView tv_order;
    @BindView(R.id.tv_balance)
    TextView tv_balance;
    @BindView(R.id.tv_money)
    TextView money;
    RechargeListM.DataBean dataBean;
    private Unbinder unbinder;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_rechargedetails);
        unbinder = ButterKnife.bind(this);
        Intent intent = getIntent();
        dataBean = (RechargeListM.DataBean) intent.getSerializableExtra("recharge_detail");
        initView();
    }

    private void initView(){
        tv_nav_title.setText("充值详情");
        if (dataBean != null) {
            tv_price.setText("" + dataBean.getShareValue());
            tv_time.setText(dataBean.getCreateTime());
            tv_order.setText(dataBean.getId() + "");
            tv_balance.setText("" + dataBean.getShareValue());
            money.setText(dataBean.getMoney());
        }

    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        unbinder.unbind();
    }
}
